#include<stdio.h>
int main(){
	int hh,mm,ss;
	int num;
	scanf("%d:%d:%d",&hh,&mm,&ss);
	scanf("%d",&num);
	if(num>=3600){
	hh+=num/60/60;
	mm+=num/60%60;
	ss+=num%60;
	}else if(num>=60){
		mm+=num/60;
		ss+=num%60;
	}else 
	ss+=num;
	if(ss>=60){
	mm++;
	ss-=60;
	}
	if(mm>=60){
	hh++;
	mm-=60;
	}
	if(hh>=24)
	hh-=24;
	//printf("%d:%d:%d",hh-24,mm-60,ss-60);
	printf("%02d:%02d:%02d",hh,mm,ss);
	return 0;
} 
